Guarded Attribute Grammars
نویسنده
چکیده
Contrary to a widely-held belief, it is possible to construct executable specifications of language processors that use a top-down parsing strategy and which have structures that directly reflect the structure of grammars containing left-recursive productions. A novel technique has been discovered by which the non-termination that would otherwise occur is avoided by ‘guarding’ top-down left-recursive language processors by non-left-recursive recognizers. The use of a topdown parsing strategy increases modularity and the use of left-recursive productions facilitates specification of semantic equations. A combination of the two is of significant practical value because it results in modular and expressively clear executable specifications of language processors. The new approach has been tested in an attribute grammar programming environment that has been used in a number of projects including the development of natural language interfaces, SQL processors and circuit design transformers within a VLSI design package.
منابع مشابه
Multi-Plan Attribute Grammars
We identify a new class of non-circular attribute grammars, called the multi-plan attribute grammars, for which static evaluation plans can be computed. The class of multi-plan attribute grammars is larger than all currently known classes of non-circular attribute grammars with static evaluation plans. The decision procedure and the procedure for computing evaluation plans take essentially poly...
متن کاملObject - Oriented Attribute Grammars
This paper introduces object-oriented attribute grammars. These can be characterized as a notation for all classes of attribute grammars. Based on a subtype relation between grammar rules, inheritance of attributes and attribute computations are defined. With this approach, attributes local to grammar rules and the elimination of chain rules are possible without any special constructs. We prese...
متن کاملA New Foundation of Attribute Grammars in Traced Symmetric Monoidal Categories
In this paper we propose a new categorical formulation of attribute grammars in traced symmetric monoidal categories. The new formulation, called monoidal attribute grammars, concisely captures the essence of the classical attribute grammars. We study monoidal attribute grammars in two categories: Rel and ωCPPO. It turns out that in Rel monoidal attribute grammars correspond to the graphtheoret...
متن کاملCan we transform logic programs into attribute grammars?
In this paper we study the relationship between Attribute Grammars and Logic Programs, concentrating on transforming logic programs into attribute grammars. This has potential applications in compilation techniques for logic programs. It does not seem possible to transform arbitrary Logic Programs into Attribute Grammars, basically because the same logic variables can sometimes be used as input...
متن کاملUsing Attribute Grammars to Derive Eecient Functional Programs
Two mappings from attribute grammars to lazy functional programs are deened. One of these mappings is an eecient implementation of attribute grammars. The other mapping yields ineecient programs. It is shown how some transformations of functional programs may be better understood by viewing the programs as ineecient implementations of attribute grammars.
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Softw., Pract. Exper.
دوره 23 شماره
صفحات -
تاریخ انتشار 1993